import request from '@/utils/request'

// 查询审批单schema列表
export function listFormSchema(query) {
  return request({
    url: '/biz/approvalFormSchema/list',
    method: 'post',
    data: query
  })
}

// 查询审批单schema详细
export function getFormSchema(id) {
  return request({
    url: '/biz/formSchema/' + id,
    method: 'get'
  })
}

// 新增审批单schema
export function addFormSchema(data) {
  return request({
    url: '/biz/approvalFormSchema/add',
    method: 'get',
    params: data
  })
}

// 修改审批单schema
export function updateFormSchema(data) {
  return request({
    url: '/biz/approvalFormSchema/edit',
    method: 'put',
    data: data
  })
}

// 删除审批单schema
export function delFormSchema(id) {
  return request({
    url: '/biz/approvalFormSchema/' + id,
    method: 'delete'
  })
}
// 刷新审批表单配置
export function approvalFormSchema(id) {
  return request({
    url: '/biz/approvalFormSchema/' + id,
    method: 'put'
  })
}